home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Sample Code / Music Architecture / Mixed Bag / •Instrument Editor / More IE Routines.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-22  |  885 b   |  53 lines  |  [TEXT/KAHL]

  1.  
  2.  
  3. #include "More IE Routines.h"
  4. #include "BigEasyDialogs.h"
  5.  
  6.  
  7. void SetMasterTuneDoc(short n,short menuItem, short menuRef)
  8.     {
  9.     TDoc *d;
  10.     Boolean x;
  11.     Fixed tune;
  12.  
  13.     d = &gDoc[n - kFirstDocWindow];
  14.  
  15.     tune = MusicGetMasterTune(d->ci);
  16.  
  17.     FlashResult(tune);
  18.  
  19.     x = EasyDialogGetNumber("\pRecall Instrument",
  20.             "\pRecall instrument number:",
  21.             &d->recallInstrument);
  22.  
  23.     if(x)
  24.         {
  25.         ComponentResult result;
  26.         result = MusicSetMasterTune(d->ci,tune);
  27.         FlashResult(result);
  28.         }
  29.     }
  30.  
  31.  
  32. void SetDefaultInstrumentDoc(short n,short menuItem, short menuRef)
  33.     {
  34.     TDoc *d;
  35.     short i;
  36.     long t;
  37.  
  38.     d = &gDoc[n - kFirstDocWindow];
  39.  
  40.     for(i = 0; i < d->instrumentKnobCount; i++)
  41.         {
  42.         MusicSetPartKnob(d->ci,d->part,i+1,(*d->ikdList)[i].defaultValue);
  43.         }
  44.  
  45.     MusicSetPartName(d->ci,d->part,"\pDefault Instrument");
  46.     MusicGetPartName(d->ci,d->part,d->instrumentName);
  47.     DrawStats(d);
  48.  
  49.     UpdateSliderKnobs(d);
  50.     }
  51.  
  52.  
  53.